using System;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;

namespace OpenWaves.ActivityFeed.Sharepoint.Feature.Features.ActivityFeedFeature
{
    /// <summary>
    /// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade.
    /// </summary>
    /// <remarks>
    /// The GUID attached to this class may be used during packaging and should not be modified.
    /// </remarks>

    [Guid("27930910-1004-47dd-81f8-32c8e1567beb")]
    public class ActivityFeedFeatureEventReceiver : ActivityFeedFeatureReceiverBase
    {
        protected override bool CanAddList(SPList list)
        {
            return list.BaseTemplate == SPListTemplateType.DocumentLibrary ||
                list.BaseTemplate == SPListTemplateType.WebPageLibrary ||
                list.BaseTemplate == SPListTemplateType.Tasks;
        }

        protected override string GetActivityFeedConectionString()
        {
            return "Url=http://localhost:8080";
        }

        protected override Type GetEventReceiverClassName()
        {
            return typeof(ActivityFeedEventReceiver);
        }
    }
}
